//TODO Insert en Edit een gezamelijke view van maken?
Ext.define('ProjectAON.view.indicatorenBeheren.Edit', {
    extend:'Ext.window.Window',
    alias:'widget.indicatoredit',
    title:'Bewerken',
    layout:'fit',
    //require:'Ext.form.*',
    autoShow:true,
    width: 290,

    initComponent:function () {
        this.items = [
            {
                defaults:{
                    allowBlank:false,
                    msgTarget:'side'
                },

                xtype:'form',
                items:[
                    {
                        xtype: 'label',
                        id:'lblZG',
                        text:'Zeer goed'
                    },
                    {
                        xtype: 'fieldcontainer',
                        layout: 'hbox',
                        items: [
                            {
                                xtype: 'label',
                                id:'lblMinZG',
                                text:3,
                                forId: 'myFieldId',
                                margins: '0 10 0 10',
                                width:10
                            },
                            {
                                xtype:'slider',
                                id:'sliderZG',
                                width: 220,
                                increment: 1,
                                minValue: 3,
                                maxValue: 10,
                                useTips:true
                            },
                            {
                                xtype: 'label',
                                id:'lblMaxZG',
                                text:10,
                                forId: 'myFieldId',
                                margins: '0 0 0 10',
                                width:10
                            }
                        ]
                    },
                    {
                        xtype: 'label',
                        id:'lblG',
                        text:'Goed'
                    },
                    {
                        xtype: 'fieldcontainer',
                        layout: 'hbox',
                        items: [
                            {
                                xtype: 'label',
                                id:'lblMinG',
                                text:2,
                                forId: 'myFieldId',
                                margins: '0 10 0 10',
                                width:10
                            },
                            {
                                xtype:'slider',
                                id:'sliderG',
                                width: 220,
                                increment: 1,
                                minValue: 2,
                                maxValue: 9,
                                useTips:true
                            },
                            {
                                xtype: 'label',
                                id:'lblMaxG',
                                text:9,
                                forId: 'myFieldId',
                                margins: '0 0 0 10',
                                width:10
                            }
                        ]
                    },
                    {
                        xtype: 'label',
                        id:'lblV',
                        text:'Voldoende'
                    },
                    {
                        xtype: 'fieldcontainer',
                        layout: 'hbox',
                        items: [
                            {
                                xtype: 'label',
                                id:'lblMinV',
                                text:1,
                                forId: 'myFieldId',
                                margins: '0 10 0 10',
                                width:10
                            },
                            {
                                xtype:'slider',
                                id:'sliderV',
                                width: 220,
                                increment: 1,
                                minValue: 1,
                                maxValue: 8,
                                useTips:true
                            },
                            {
                                xtype: 'label',
                                id:'lblMaxV',
                                text:8,
                                forId: 'myFieldId',
                                margins: '0 0 0 10',
                                width:10
                            }
                        ]
                    },
                    {
                        xtype: 'label',
                        id:'lblO',
                        text:'Onvoldoende'
                    },
                    {
                        xtype: 'fieldcontainer',
                        layout: 'hbox',
                        items: [
                            {
                                xtype: 'label',
                                id:'lblMinO',
                                text:0,
                                forId: 'myFieldId',
                                margins: '0 10 0 10',
                                width:10
                            },
                            {
                                xtype:'slider',
                                id:'sliderO',
                                width: 220,
                                increment: 1,
                                minValue: 0,
                                maxValue: 7,
                                useTips:true
                            },
                            {
                                xtype: 'label',
                                id:'lblMaxO',
                                text:7,
                                forId: 'myFieldId',
                                margins: '0 0 0 10',
                                width:10
                            }
                        ]
                    }
                ],

                buttons:[
                    {
                        text:'Opslaan',
                        formBind:true,
                        action:'save'
                    },
                    {
                        text:'Annuleer',
                        scope:this,
                        action:'close',
                        handler:this.close
                    }
                ]
            }
        ];

        this.callParent(arguments);
    }
});